'use strict';

export default {
    // bindEvents(events){
    //     for (let i = 0, l = events.length; i < l; i++) {
    //         if (!events[i].element) {
    //             $(events[i].target).on(events[i].event, events[i])
    //         } else {
    //             $(events[i].element).on(events[i].event, events[i].target, events[i].handler)
    //         }
    //     }
    // },
    bindEvents: function(bindings) {
            var $$ = Dom7;
        
        for (var i in bindings) {
            if(bindings[i].selector) {
                $$(bindings[i].element)
                    .on(bindings[i].event,bindings[i].selector , bindings[i].handler);
            }else{
                $$(bindings[i].element)
                    .on(bindings[i].event, bindings[i].handler);
            }
        }
    },
    renderTpl(tpl, data){
        return Template7.compile(tpl)(data);
    }
}